From: Florian Müllner Date: Tue, 14 May 2013 16:55:08 +0000 (+0200) Subject: PopupMenuManager: Fix child menus X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4175 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b588ae4e0e590ec08cd39a62f74e83fafda83e9d;p=gnome-shell.git PopupMenuManager: Fix child menus Since commit c84dc6254d2d65c, popup menus are closed automatically when another menu opens (to catch the case where a menu is opened by keyboard shortcut, which wasn't handled before). However in the case of child menus, both child and parent are expected to be visible, so handle this case explicitly. https://bugzilla.gnome.org/show_bug.cgi?id=699678 --- diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index c3ac653f2..6f76a27f2 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -1875,7 +1875,7 @@ const PopupMenuManager = new Lang.Class({ _onMenuOpenState: function(menu, open) { if (open) { - if (this.activeMenu) + if (this.activeMenu && !this.activeMenu.isChildMenu(menu)) this.activeMenu.close(BoxPointer.PopupAnimation.FADE); this._grabHelper.grab({ actor: menu.actor, modal: true, focus: menu.sourceActor, onUngrab: Lang.bind(this, this._closeMenu, menu) });